<template>
  <div class="contains" style="margin: 0px 20px;">
    <equipment-tree ref="recTree" :list.sync="treeDataSource" @actionFunc="actionFunc" @deleteFunc="deleteFunc" @handlerExpand="handlerExpand" @orderByFunc="orderByFunc"></equipment-tree>
  </div>
</template>
<script>
  import equipmentTree from '../../../component/tree/equipment-tree'
  export default {
    name: "equipment-class",
    data() {
      return {
        treeDataSource: []
      }
    },
    components: {
      equipmentTree
    },
    methods: {
      orderByFunc(val) {
        alert('排序')
        alert(val)
      },
      actionFunc(m) {
        alert('编辑')
      },
      deleteFunc(m) {
        alert('删除')
      },
      handlerExpand(m) {
        console.log('展开/收缩')
        m.isExpand = !m.isExpand
      }
    },
  }
</script>

<style scoped>

</style>

